package com.polaris.live.adapter.live

import com.polaris.live.R
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterAdministratorItemBinding
import com.polaris.live.im.sfs.bean.live.ext.UserBasicVo

/**
 * 管理员列表适配器
 *
 * @author Created by 半仙 on 2024/5/30/030 12:33
 */
class AdministratorUserAdapter : BaseBindingAdapter<AdapterAdministratorItemBinding, UserBasicVo>() {

    init {
        addChildClickViewIds(R.id.tv_remove_user)
    }

    override fun convert(holder: VBViewHolder<AdapterAdministratorItemBinding>, item: UserBasicVo) {
        holder.vb.apply {
            avHead.setImageUrl(item.avatar)
            itemUserName.text = item.nickname
            viewCountry.setCountry(item.country)
            viewSexAge.setSexAndAge(item.sex, item.birthday)
            vipView.setVipLevel(item.vipLevel)
            level1.setRichsLevel(item.richs)
            level2.setCharmsLevel(item.charms)
        }
    }
}